///////////////////////////////////////////////////////////
//  SampleSourcesafe.h
//  Implementation of the Class SampleSourcesafe
//  Created on:      21-sep-2007 15:40:07
///////////////////////////////////////////////////////////

#if !defined(EA_6E1EC202_403A_491a_AE8D_96FDB5D1A1A2__INCLUDED_)
#define EA_6E1EC202_403A_491a_AE8D_96FDB5D1A1A2__INCLUDED_

#include <string>
#include "CloudLayer.h"
#include "ObjectDomain.h"
#include "../../indexado/fuentes/RecordHandler.h"
#include "../../indexado/fuentes/OrganizationCommons.h"

#define SIZE_SAMPLESOURCESAFE_SCHEMA 15

class SampleSourcesafe : public ObjectDomain
{

public:

	SampleSourcesafe();
	virtual ~SampleSourcesafe();
	std::string getValor(std::string atribName);
	void loadAtribFromNode(XMLNode* node);
	void loadRegistro(void* registro);
	void saveInRegistro(void* reg);
	campo* getSchema();
	campo* getPrimaryKey();
	bool EsMayor(std::string atributte, Persistent *object);
	std::string getKey();
	void setKey(std::string key);
	int getSchemaSize();
	void setPKSampleSourcesafe(std::string pk);
	void setStationCode(std::string code);
	void setAltm(std::string a);
	void setDate(std::string d);
	void setDew(std::string d);
	void setDir(std::string d);
	void setGus(std::string g);
	void setHour(std::string h);
	void setRh(std::string r);
	void setSpd(std::string s);
	void setTmp(std::string t);
	void setVis(std::string v);
	void setWeather(std::string w);
		
	std::string getPKSampleSourcesafe();
	std::string getStationCode(void);
	std::string getAltm();
	std::string getDate();
	std::string getDew();
	std::string getDir();
	std::string getGus();
	std::string getHour();
	std::string getRh();
	std::string getSpd();
	std::string getTmp();
	std::string getVis();
	std::string getWeather();
	
	XMLNode* toViewXML();
	const SampleSourcesafe & operator=(const SampleSourcesafe&);
	
	static campo* getCampoPorAtrib(std::string atribName);
	
	void print();
	
	static campo PK[2];
	static campo CODE[2];
	static campo ALTM[2];
	static campo DATE[2];
	static campo DEW[2];
	static campo DIR[2];
	static campo GUS[2];
	static campo HOUR[2];
	static campo RH[2];
	static campo SPD[2];
	static campo TMP[2];
	static campo VIS[2];
	static campo WEATHER[2];
	
	static campo SAMPLESOURCESAFE_SCHEMA[SIZE_SAMPLESOURCESAFE_SCHEMA];
private:
	std::string PKSampleSourcesafe;
	std::string stationCode;
	std::string altm;
	std::string date;
	std::string dew;
	std::string dir;
	std::string gus;
	std::string hour;
	std::string rh;
	std::string spd;
	std::string tmp;
	std::string vis;
	std::string weather;
	

};
#endif // !defined(EA_6E1EC202_403A_491a_AE8D_96FDB5D1A1A2__INCLUDED_)
